package com.umeox.watch.moto.dataservice.mqtt.bean;

/**
 * Created by Rambo 2021/9/28
 * Describe:
 */
public class ChatMsgBody {

    public String holderId;

    public String friendId;

    public int type;

    public long msgTime;

    public int msgType;

    public String msgBody;

    public static final class Builder {
        public String holderId;
        public String friendId;
        public int type;
        public long msgTime;
        public int msgType;
        public String msgBody;

        private Builder(){

        }

        public static Builder buildChatMsg(){
            return new Builder();
        }

        public Builder setHolderId(String holderId) {
            this.holderId = holderId;
            return this;
        }

        public Builder setFriendId(String friendId) {
            this.friendId = friendId;
            return this;
        }

        public Builder setType(int type) {
            this.type = type;
            return this;
        }

        public Builder setMsgTime(long msgTime) {
            this.msgTime = msgTime;
            return this;
        }

        public Builder setMsgType(int msgType) {
            this.msgType = msgType;
            return this;
        }

        public Builder setMsgBody(String msgBody) {
            this.msgBody = msgBody;
            return this;
        }

        public ChatMsgBody build(){
            ChatMsgBody chatMsgBody = new ChatMsgBody();
            chatMsgBody.holderId = this.holderId;
            chatMsgBody.friendId = this.friendId;
            chatMsgBody.type = this.type;
            chatMsgBody.msgTime = this.msgTime;
            chatMsgBody.msgType = this.msgType;
            chatMsgBody.msgBody = this.msgBody;

            return chatMsgBody;
        }
    }

    @Override
    public String toString() {
        return "ChatMsgBody{" +
                "holderId='" + holderId + '\'' +
                ", friendId='" + friendId + '\'' +
                ", type=" + type +
                ", msgTime=" + msgTime +
                ", msgType=" + msgType +
                ", msgBody='" + msgBody + '\'' +
                '}';
    }
}
